<?php
$sql="
CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_ad` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `bgcolor` varchar(10) NOT NULL,
  `title` varchar(200) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `cateid` int(11) NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `is_ios` int(2) NOT NULL DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(500) NOT NULL,
  `url` varchar(255) DEFAULT '',
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `waimaitt_list_bgcolor` varchar(10) NOT NULL,
  `waimaitt_list_leftupicon` varchar(255) NOT NULL,
  `waimaitt_list_leftdownicon` varchar(255) NOT NULL,
  `waimaitt_list_jine` varchar(10) NOT NULL,
  `waimaitt_list_jineunit` varchar(10) NOT NULL,
  `waimaitt_list_jinerighttext` varchar(30) NOT NULL,
  `waimaitt_list_lingqutext` varchar(20) NOT NULL,
  `waimaitt_list_lingqucolor` varchar(10) NOT NULL,
  `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `is_show` (`is_show`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_goods_cate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `pintai` varchar(10) NOT NULL,
  `catename` varchar(30) NOT NULL,
  `cateid` int(11) NOT NULL,
  `is_show` int(2) DEFAULT '0',
  `displayorder` int(4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_goodsfeeds` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `content` varchar(1024) DEFAULT NULL COMMENT '动态内容',
  `photos` text COMMENT '图片JSON',
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(50) NOT NULL,
  `cateid` int(11) DEFAULT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(128) NOT NULL,
  `url` varchar(255) DEFAULT '',
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(100) DEFAULT NULL,
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(255) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `create_time` int(10) NOT NULL DEFAULT '0',
  `goods_img` varchar(256) NOT NULL,
  `goods_pintai` varchar(10) NOT NULL,
  `goods_id` varchar(20) NOT NULL,
  `goods_title` varchar(50) NOT NULL,
  `goods_cateid` int(10) NOT NULL,
  `nickname` varchar(20) NOT NULL,
  `avatar` varchar(255) NOT NULL,
  `s_id` int(10) NOT NULL,
  PRIMARY KEY (`item_id`),
  KEY `uniacid` (`uniacid`),
  KEY `displayorder` (`displayorder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_groupchat` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `s_id` int(11) DEFAULT '0',
  `code` int(10) DEFAULT '0',
  `nickname` varchar(30) NOT NULL,
  `avatar` varchar(255) NOT NULL,
  `groupid` int(11) NOT NULL,
  `openid` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `time` int(11) NOT NULL,
  `type` tinyint(1) NOT NULL,
  `yuyintime` smallint(6) NOT NULL,
  `title` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '99',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(500) NOT NULL,
  `url` varchar(255) DEFAULT '',
  `link_title` varchar(100) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(255) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `is_send` int(2) NOT NULL DEFAULT '0',
  `goods_title` varchar(50) NOT NULL,
  `goods_pintai` varchar(10) NOT NULL,
  `goods_cateid` int(10) DEFAULT '0',
  `goods_id` varchar(20) NOT NULL,
  `goods_img` varchar(256) NOT NULL,
  `tkl` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `groupid` (`groupid`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_kefubind` (
  `bind_id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间',
  `type` varchar(10) DEFAULT NULL,
  `ad_id` int(10) NOT NULL DEFAULT '0',
  `link_title` varchar(64) NOT NULL COMMENT '图文标题',
  `link_desc` varchar(64) NOT NULL COMMENT '图文描述',
  `link_thumb` varchar(256) NOT NULL COMMENT '图文图片',
  `link_url` varchar(256) NOT NULL COMMENT '图文链接',
  `content` text COMMENT '内容',
  PRIMARY KEY (`bind_id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_sharegoods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL,
  `deal_id` int(11) NOT NULL,
  `coupon` text NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_tequan_cate` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `catename` varchar(200) DEFAULT NULL,
  `thumb` varchar(255) DEFAULT '',
  `displayorder` int(11) DEFAULT '0',
  `enabled` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_tequan_item` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `cateid` int(11) NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `title_text` varchar(50) DEFAULT NULL,
  `thumb` varchar(255) DEFAULT '',
  `displayorder` int(11) DEFAULT '0',
  `enabled` int(11) DEFAULT '0',
  `huitype` int(2) DEFAULT '0',
  `is_hot` int(2) DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(500) NOT NULL,
  `url` varchar(255) DEFAULT '',
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `title_fu` varchar(64) NOT NULL,
  `title_desc` varchar(64) NOT NULL,
  `is_ios` int(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_one_user` (
  `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `openid` varchar(64) DEFAULT NULL COMMENT '用户OPENID',
  `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID',
  `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长',
  `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型',
  `nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(256) DEFAULT NULL COMMENT '头像',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户',
  `unionid` varchar(64) DEFAULT NULL COMMENT '用户unionid',
  `invite_uid` varchar(128) NOT NULL,
  `relation_id` varchar(32) DEFAULT NULL COMMENT '用户渠道ID',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`),
  KEY `uniacid` (`uniacid`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

";
pdo_run($sql);
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `path` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_leftupicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_leftupicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_leftdownicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_leftdownicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_jine")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_jine` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_jineunit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_jineunit` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_jinerighttext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_jinerighttext` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_lingqutext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_lingqutext` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_lingqucolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_lingqucolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_ad", "waimaitt_list_lingqubgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_ad")." ADD `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "pintai")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `pintai` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "catename")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `catename` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `is_show` int(2) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goods_cate", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goods_cate")." ADD `displayorder` int(4) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "item_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `item_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `content` varchar(1024) COMMENT '动态内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "photos")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `photos` text COMMENT '图片JSON';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `title_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `cateid` int(11);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `path` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `reply_text` varchar(100);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `link_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `create_time` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "goods_img")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `goods_img` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "goods_pintai")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `goods_pintai` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `goods_id` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `goods_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "goods_cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `goods_cateid` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `nickname` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `avatar` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_goodsfeeds", "s_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_goodsfeeds")." ADD `s_id` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "s_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `s_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "code")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `code` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `nickname` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `avatar` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "groupid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `groupid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `openid` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `type` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "yuyintime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `yuyintime` smallint(6) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `adtype` int(2) NOT NULL DEFAULT '99';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `path` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `link_title` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `link_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "is_send")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `is_send` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `goods_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "goods_pintai")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `goods_pintai` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "goods_cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `goods_cateid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `goods_id` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "goods_img")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `goods_img` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_groupchat", "tkl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_groupchat")." ADD `tkl` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "bind_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `bind_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "active_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `type` varchar(10);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "ad_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `ad_id` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `link_title` varchar(64) NOT NULL COMMENT '图文标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `link_desc` varchar(64) NOT NULL COMMENT '图文描述';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `link_thumb` varchar(256) NOT NULL COMMENT '图文图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `link_url` varchar(256) NOT NULL COMMENT '图文链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_kefubind", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_kefubind")." ADD `content` text COMMENT '内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_sharegoods", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_sharegoods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_sharegoods", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_sharegoods")." ADD `shop_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_sharegoods", "deal_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_sharegoods")." ADD `deal_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_sharegoods", "coupon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_sharegoods")." ADD `coupon` text NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_sharegoods", "time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_sharegoods")." ADD `time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "catename")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `catename` varchar(200);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_cate", "enabled")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_cate")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `title` varchar(200);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `title_text` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "enabled")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "huitype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `huitype` int(2) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "is_hot")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `is_hot` int(2) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `path` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "title_fu")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `title_fu` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `title_desc` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_tequan_item", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_tequan_item")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `openid` varchar(64) COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "parent_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "is_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "tuan_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `nickname` varchar(32) COMMENT '昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `avatar` varchar(256) COMMENT '头像';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `unionid` varchar(64) COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "invite_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `invite_uid` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `relation_id` varchar(32) COMMENT '用户渠道ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_one_user", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_one_user")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
